﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Api.Shared.Model.Olaiya
{
    public class OLTask
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int? Id { get; set; }

        [SugarColumn(IsNullable = true)]
        public string DocNum { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string SsccCode { get; set; } = string.Empty;

        /// <summary>
        /// 托盘码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string PalletNum { get; set; } = string.Empty;

        /// <summary>
        /// 托盘点位
        /// </summary>

        [SugarColumn(IsNullable = true)]
        public string DockCode { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        [Navigate(NavigateType.OneToMany, nameof(OLMaterial.OLTaskId))]
        public List<OLMaterial>? MaterialList { get; set; }

        /// <summary>
        /// 来料托盘位置
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? UserDef1 { get; set; } = string.Empty;

        /// <summary>
        /// 来料托盘位置short
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? UserDef1Short { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? UserDef2 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? UserDef3 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public bool? IsCompleted { get; set; } = false;

        [SugarColumn(IsNullable = true)]
        public DateTime? CreateTime { get; set; } = DateTime.Now;
    }

}